#!/usr/bin/perl -w

@lines = <STDIN>;

print "不同行输出:\n";
print sort @lines;

chomp(@lines);
@sorted = sort(@lines);
print "同一行输出：\n";
print sort "@sorted\n";
